<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
AbstractIntegerDistribution (Commons Math 3.2 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="AbstractIntegerDistribution (Commons Math 3.2 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/AbstractIntegerDistribution.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/AbstractMultivariateRealDistribution.html" title="class in org.apache.commons.math3.distribution"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="AbstractIntegerDistribution.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.math3.distribution</FONT>
<BR>
Class AbstractIntegerDistribution</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.math3.distribution.AbstractIntegerDistribution</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution">IntegerDistribution</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/commons/math3/distribution/BinomialDistribution.html" title="class in org.apache.commons.math3.distribution">BinomialDistribution</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/EnumeratedIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">EnumeratedIntegerDistribution</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/HypergeometricDistribution.html" title="class in org.apache.commons.math3.distribution">HypergeometricDistribution</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/PascalDistribution.html" title="class in org.apache.commons.math3.distribution">PascalDistribution</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html" title="class in org.apache.commons.math3.distribution">PoissonDistribution</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/UniformIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">UniformIntegerDistribution</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/ZipfDistribution.html" title="class in org.apache.commons.math3.distribution">ZipfDistribution</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public abstract class <B>AbstractIntegerDistribution</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution">IntegerDistribution</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DL>
</PRE>

<P>
Base class for integer-valued discrete distributions.  Default
 implementations are provided for some of the methods that do not vary
 from distribution to distribution.
<P>

<P>
<DL>
<DT><B>Version:</B></DT>
  <DD>$Id: AbstractIntegerDistribution.java 1455716 2013-03-12 21:12:21Z tn $</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#org.apache.commons.math3.distribution.AbstractIntegerDistribution">Serialized Form</A></DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#random">random</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RNG instance used to generate samples from the distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../org/apache/commons/math3/random/RandomDataImpl.html" title="class in org.apache.commons.math3.random">RandomDataImpl</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#randomData">randomData</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>As of 3.1, to be removed in 4.0. Please use the
 <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#random"><CODE>random</CODE></A> instance variable instead.</I></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#AbstractIntegerDistribution()">AbstractIntegerDistribution</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>As of 3.1, to be removed in 4.0. Please use
 <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#AbstractIntegerDistribution(org.apache.commons.math3.random.RandomGenerator)"><CODE>AbstractIntegerDistribution(RandomGenerator)</CODE></A> instead.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#AbstractIntegerDistribution(org.apache.commons.math3.random.RandomGenerator)">AbstractIntegerDistribution</A></B>(<A HREF="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;rng)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#cumulativeProbability(int, int)">cumulativeProbability</A></B>(int&nbsp;x0,
                      int&nbsp;x1)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(x0 &lt; X &lt;= x1)</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#inverseCumulativeProbability(double)">inverseCumulativeProbability</A></B>(double&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes the quantile function of this distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#reseedRandomGenerator(long)">reseedRandomGenerator</A></B>(long&nbsp;seed)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reseed the random generator used to generate samples.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#sample()">sample</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate a random value sampled from this distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#sample(int)">sample</A></B>(int&nbsp;sampleSize)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate a random sample from the distribution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#solveInverseCumulativeProbability(double, int, int)">solveInverseCumulativeProbability</A></B>(double&nbsp;p,
                                  int&nbsp;lower,
                                  int&nbsp;upper)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is a utility function used by <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#inverseCumulativeProbability(double)"><CODE>inverseCumulativeProbability(double)</CODE></A>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.commons.math3.distribution.IntegerDistribution"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.apache.commons.math3.distribution.<A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution">IntegerDistribution</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#cumulativeProbability(int)">cumulativeProbability</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#getNumericalMean()">getNumericalMean</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#getNumericalVariance()">getNumericalVariance</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#getSupportLowerBound()">getSupportLowerBound</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#getSupportUpperBound()">getSupportUpperBound</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#isSupportConnected()">isSupportConnected</A>, <A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#probability(int)">probability</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="randomData"><!-- --></A><H3>
randomData</H3>
<PRE>
<FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A>
</FONT>protected final <A HREF="../../../../../org/apache/commons/math3/random/RandomDataImpl.html" title="class in org.apache.commons.math3.random">RandomDataImpl</A> <B>randomData</B></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>As of 3.1, to be removed in 4.0. Please use the
 <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#random"><CODE>random</CODE></A> instance variable instead.</I><DD>RandomData instance used to generate samples from the distribution.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="random"><!-- --></A><H3>
random</H3>
<PRE>
protected final <A HREF="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A> <B>random</B></PRE>
<DL>
<DD>RNG instance used to generate samples from the distribution.
<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>3.1</DD>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="AbstractIntegerDistribution()"><!-- --></A><H3>
AbstractIntegerDistribution</H3>
<PRE>
<FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A>
</FONT>protected <B>AbstractIntegerDistribution</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>As of 3.1, to be removed in 4.0. Please use
 <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#AbstractIntegerDistribution(org.apache.commons.math3.random.RandomGenerator)"><CODE>AbstractIntegerDistribution(RandomGenerator)</CODE></A> instead.</I>
<P>
</DL>
<HR>

<A NAME="AbstractIntegerDistribution(org.apache.commons.math3.random.RandomGenerator)"><!-- --></A><H3>
AbstractIntegerDistribution</H3>
<PRE>
protected <B>AbstractIntegerDistribution</B>(<A HREF="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</A>&nbsp;rng)</PRE>
<DL>
<DL>
<DT><B>Parameters:</B><DD><CODE>rng</CODE> - Random number generator.<DT><B>Since:</B></DT>
  <DD>3.1</DD>
</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="cumulativeProbability(int, int)"><!-- --></A><H3>
cumulativeProbability</H3>
<PRE>
public double <B>cumulativeProbability</B>(int&nbsp;x0,
                                    int&nbsp;x1)
                             throws <A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</A></PRE>
<DL>
<DD>For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(x0 &lt; X &lt;= x1)</code>.

 The default implementation uses the identity
 <p><code>P(x0 &lt; X &lt;= x1) = P(X &lt;= x1) - P(X &lt;= x0)</code></p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#cumulativeProbability(int, int)">cumulativeProbability</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution">IntegerDistribution</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x0</CODE> - the exclusive lower bound<DD><CODE>x1</CODE> - the inclusive upper bound
<DT><B>Returns:</B><DD>the probability that a random variable with this distribution
 will take a value between <code>x0</code> and <code>x1</code>,
 excluding the lower and including the upper endpoint
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</A></CODE> - if <code>x0 &gt; x1</code></DL>
</DD>
</DL>
<HR>

<A NAME="inverseCumulativeProbability(double)"><!-- --></A><H3>
inverseCumulativeProbability</H3>
<PRE>
public int <B>inverseCumulativeProbability</B>(double&nbsp;p)
                                 throws <A HREF="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</A></PRE>
<DL>
<DD>Computes the quantile function of this distribution.
 For a random variable <code>X</code> distributed according to this distribution,
 the returned value is
 <ul>
 <li><code>inf{x in Z | P(X<=x) >= p}</code> for <code>0 &lt; p &lt;= 1</code>,</li>
 <li><code>inf{x in Z | P(X<=x) > 0}</code> for <code>p = 0</code>.</li>
 </ul>
 If the result exceeds the range of the data type <code>int</code>,
 then <code>Integer.MIN_VALUE</code> or <code>Integer.MAX_VALUE</code> is returned.

 The default implementation returns
 <ul>
 <li><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#getSupportLowerBound()"><CODE>IntegerDistribution.getSupportLowerBound()</CODE></A> for <code>p = 0</code>,</li>
 <li><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#getSupportUpperBound()"><CODE>IntegerDistribution.getSupportUpperBound()</CODE></A> for <code>p = 1</code>, and</li>
 <li><A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#solveInverseCumulativeProbability(double, int, int)"><CODE>solveInverseCumulativeProbability(double, int, int)</CODE></A> for
     <code>0 &lt; p &lt; 1</code>.</li>
 </ul>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#inverseCumulativeProbability(double)">inverseCumulativeProbability</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution">IntegerDistribution</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - the cumulative probability
<DT><B>Returns:</B><DD>the smallest <code>p</code>-quantile of this distribution
 (largest 0-quantile for <code>p = 0</code>)
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</A></CODE> - if <code>p &lt; 0</code> or <code>p &gt; 1</code></DL>
</DD>
</DL>
<HR>

<A NAME="solveInverseCumulativeProbability(double, int, int)"><!-- --></A><H3>
solveInverseCumulativeProbability</H3>
<PRE>
protected int <B>solveInverseCumulativeProbability</B>(double&nbsp;p,
                                                int&nbsp;lower,
                                                int&nbsp;upper)</PRE>
<DL>
<DD>This is a utility function used by <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#inverseCumulativeProbability(double)"><CODE>inverseCumulativeProbability(double)</CODE></A>. It assumes <code>0 &lt; p &lt; 1</code> and
 that the inverse cumulative probability lies in the bracket <code>(lower, upper]</code>. The implementation does simple bisection to find the
 smallest <code>p</code>-quantile <code>inf{x in Z | P(X<=x) >= p}</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - the cumulative probability<DD><CODE>lower</CODE> - a value satisfying <code>cumulativeProbability(lower) &lt; p</code><DD><CODE>upper</CODE> - a value satisfying <code>p &lt;= cumulativeProbability(upper)</code>
<DT><B>Returns:</B><DD>the smallest <code>p</code>-quantile of this distribution</DL>
</DD>
</DL>
<HR>

<A NAME="reseedRandomGenerator(long)"><!-- --></A><H3>
reseedRandomGenerator</H3>
<PRE>
public void <B>reseedRandomGenerator</B>(long&nbsp;seed)</PRE>
<DL>
<DD>Reseed the random generator used to generate samples.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#reseedRandomGenerator(long)">reseedRandomGenerator</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution">IntegerDistribution</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>seed</CODE> - the new seed</DL>
</DD>
</DL>
<HR>

<A NAME="sample()"><!-- --></A><H3>
sample</H3>
<PRE>
public int <B>sample</B>()</PRE>
<DL>
<DD>Generate a random value sampled from this distribution.

 The default implementation uses the
 <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling">
 inversion method</a>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#sample()">sample</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution">IntegerDistribution</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a random value</DL>
</DD>
</DL>
<HR>

<A NAME="sample(int)"><!-- --></A><H3>
sample</H3>
<PRE>
public int[] <B>sample</B>(int&nbsp;sampleSize)</PRE>
<DL>
<DD>Generate a random sample from the distribution.

 The default implementation generates the sample by calling
 <A HREF="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#sample()"><CODE>sample()</CODE></A> in a loop.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#sample(int)">sample</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution">IntegerDistribution</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sampleSize</CODE> - the number of random values to generate
<DT><B>Returns:</B><DD>an array representing the random sample</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/AbstractIntegerDistribution.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../org/apache/commons/math3/distribution/AbstractMultivariateRealDistribution.html" title="class in org.apache.commons.math3.distribution"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="AbstractIntegerDistribution.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2003-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
